package ysc.cqnu.operdb.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ysc.cqnu.operdb.entity.Qinyou;
import ysc.cqnu.operdb.entity.ResultData;
import ysc.cqnu.operdb.mapper.QinYouMapper;
import ysc.cqnu.operdb.service.EnterQinYouInfoViewDetailsService;

@Service
public class EnterQinYouInfoViewDetailsServiceImpl implements EnterQinYouInfoViewDetailsService {
    @Autowired
    private ResultData resultData;
    @Autowired
    private Qinyou qinyouinfo;
    @Autowired
    private QinYouMapper qinYouMapper;
    @Override
    public ResultData enterQinYouInfoViewDetailsService(String id) {
        try {
            qinyouinfo = qinYouMapper.qinyoudetails(id);
            resultData.flag="enterQinyouInfoViewDetailsSuccess";
            resultData.data=qinyouinfo;
            return resultData;
        }
        catch (Exception e){
            resultData.flag="enterQinyouInfoViewDetailsFail";
            resultData.data=null;
            return resultData;
        }
    }
}
